import { NgModule } from '@angular/core';
import { Routes, RouterModule }  from '@angular/router';
import { CompanyComponent } from './company.component';
import {
  CompanyCertificateRenewComponent,
  CompanyChangeComponent,
  ExamRegisterComponent,
  CompCertificateReissueComponent,
  CompanyMoveComponent,
  CompanyUIMComponent,
  CompInfoModifyComponent
} from './apply';
import { PublishCompanyComponent } from './publish';
import { CompCertManComponent } from './info-record';
import { ChangePassComponent } from "../../theme/components";

// noinspection TypeScriptValidateTypes
const routes: Routes = [
  {
    path: '',
    component: CompanyComponent,
    children: [
      { path: '', redirectTo: 'apply/ea', pathMatch: 'full' },
      { path: 'dashboard', loadChildren: () => System.import('../dashboard/dashboard.module') },
      { path: 'apply/ea', component: ExamRegisterComponent },
      { path: 'apply/cr', component: CompanyCertificateRenewComponent},
      { path: 'apply/cc', component: CompanyChangeComponent },
      { path: 'apply/ci', component:   CompCertificateReissueComponent },
      { path: 'apply/cm', component:   CompanyMoveComponent },
      { path: 'apply/cim', component:   CompInfoModifyComponent },
      { path: 'apply/ui', component:   CompanyUIMComponent },
      { path: 'record/publish', component:   PublishCompanyComponent },
      { path: 'record/cm', component:   CompCertManComponent },
      { path: 'changepass', component:   ChangePassComponent },
    ]
  }
];


@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class CompanyRoutingModule { }
